home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group94b.txt / 000115_icon-group-sender _Sun Nov 20 16:57:46 1994.msg < prev    next >
Internet Message Format  |  1995-02-09  |  2KB

  1. Received: by cheltenham.cs.arizona.edu; Sun, 20 Nov 1994 18:15:15 MST
  2. To: icon-group-l@cs.arizona.edu
  3. Date: 20 Nov 1994 16:57:46 -0700
  4. From: dave@cs.arizona.edu (Dave Schaumann)
  5. Message-Id: <3aonpq$4kp@caslon.CS.Arizona.EDU>
  6. Organization: University of Arizona CS Department, Tucson AZ
  7. Sender: icon-group-request@cs.arizona.edu
  8. References: <3aofof$f5m@highway.leidenuniv.nl>
  9. Subject: Re: optional typing in Icon (longish)
  10. Errors-To: icon-group-errors@cs.arizona.edu
  11.  
  12. In article <3aofof$f5m@highway.leidenuniv.nl>,
  13. Jan-Peter de Ruiter <ruiter@ruls41.LeidenUniv.nl> wrote:
  14. [much deletia]
  15. >o How much optimisation opportunities will arise from having
  16. >  variables with a fixed type.
  17.  
  18. For types that have primitive operations that can be implemented
  19. in a few machine operations (few enough to be in-lined reasonably),
  20. this can be a significant savings.  Not only do you get the benefit
  21. of not having to go through the general case (which probably involves
  22. a function call), but you also get the benefit of less stuff dynamically
  23. allocated, so the garbage collecter has less work to do.
  24.  
  25. For stuff like lists and tables, where most operations are going to
  26. be function calls anyway (and probably require garbage collection
  27. anyway), there probably won't be any benefit at all.
  28.  
  29. >o How much speed & size performance gain could be expected from 
  30. >  this.
  31.  
  32. I wouldn't look for a lot of size gain from this sort of optimization.
  33. Much of the size of a compiled Icon program is due to the support
  34. libraries, which you'll need anyway.  Speed is really where the win
  35. is in this kind of optimization.  How much speed you can get is a
  36. matter for research.
  37.  
  38. >o Could a version of the Icon runtime environment be developed
  39. >  that gives information on how often the type of all variables 
  40. >  changes during program execution (in order to obtain reliable
  41. >  statistics on how often variables are, in effect, of fixed type)
  42.  
  43. Sure.  In fact, you could probably do this with MT Icon (multi-tasking
  44. Icon) reasonably easy.
  45.  
  46. (see ftp:cs.arizona.edu/icon/monitors for info on MT Icon)
  47.  
  48. -Dave